package cn.lili.event.impl;

import cn.lili.event.PaymentCallbackEvent;
import cn.lili.modules.payment.client.RechargeClient;
import cn.lili.modules.payment.entity.dto.PaymentCallback;
import cn.lili.modules.payment.entity.enums.PaymentSceneEnums;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * 充值执行
 *
 * @author liushuai(liushuai711 @ gmail.com)
 * @version v4.0
 * @Description:
 * @since 2023/6/25 10:00
 */

@Component
@AllArgsConstructor
public class RechargeExecute implements PaymentCallbackEvent {


    private final RechargeClient rechargeClient;

    @Override
    public void paymentCallback(PaymentCallback paymentCallback) {

        rechargeClient.paymentCallback(paymentCallback);
    }

    @Override
    public PaymentSceneEnums getScene() {
        return PaymentSceneEnums.RECHARGE;
    }
}
